package com.mine.common.helper;

import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;

public class GsonHelper {
    static {
        sGson = new Gson();
    }

    private static Gson sGson;


    public  static  String toJson(Object src) {
        return sGson.toJson(src);
    }

    public static  <T> T fromJson(String json, Class<T> classOfT) throws JsonSyntaxException {
        return sGson.fromJson(json, classOfT);
    }
}
